package com._21cn.product.dao.mybatis;

import com._21cn.framework.base.db.mybatis.BaseDaoMybatis;
import com._21cn.framework.flip.PageList;
import com._21cn.product.dao.CarBusinessPledgeDao;
import com._21cn.product.entity.CarBusinessPledge;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository("carBusinessPledgeDao")
public class CarBusinessPledgeDaoMybatis extends BaseDaoMybatis<CarBusinessPledge> implements CarBusinessPledgeDao {

    public CarBusinessPledgeDaoMybatis() {
        super();
        setNameSpace( "t_product_car_business_pledge" );
    }

    @Required
    @Autowired
    @Qualifier("sqlSessionFactory")
    public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
        super.setSqlSessionFactory( sqlSessionFactory );
    }

    @Override
    public PageList<CarBusinessPledge> getCarPledgeList(Map<String, Object> params, int pageNo, int pageSize, boolean doCount) {
        return (PageList<CarBusinessPledge>)query4PageList( getNameSpace() + ".selectByMap_pledgeCar", params, pageNo, pageSize, doCount );
    }
}